<div class="layuimini-container layuimini-page-anim">
    <div class="layuimini-main">
        <div class="layui-form layuimini-form">
            <div class="layui-form-item">
                <label class="layui-form-label required">类型<font color="red">*</font></label>
                <div class="layui-input-block">
                    <select name="" lay-filter="form1">
                        <option value="1">基本情况</option>
                        <option value="2">公司概况</option>
                        <option value="3">产品情况</option>
                        <option value="4">薪资福利</option>
                        <option value="5">满意度调查</option>
                        <option value="6">备注</option>
                    </select>
                </div>
            </div>
        </div>
            <!---基本情况 start--->
            <div id="Layer1">
                <div class="layui-form layuimini-form">
                <div class="layui-form-item">
                    <label class="layui-form-label">1. 成立时间</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入成立时间" class="layui-textarea" name="foundedTime"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">2. 业务布局</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入业务布局" class="layui-textarea" name="businessLayout"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">3. 人员规模<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入人员规模" lay-verify="required" lay-reqtext="人员规模不能为空" class="layui-textarea" name="manMore"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">4. 销售业绩<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入销售业绩" lay-verify="required" lay-reqtext="销售业绩不能为空"  class="layui-textarea" name="sole"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">5. 公司性质（外资/合资/本土）<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入公司性质" lay-verify="required" lay-reqtext="公司性质不能为空"   class="layui-textarea" name="xingzhi"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">提醒对象</label>
                    <div class="layui-input-block">
                        <input  type="text" name="tx" class="layui-input" placeholder="请输入提醒对象">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <a class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</a>
                    </div>
                </div>
            </div>
            </div>
                <!---基本情况 end--->

            <!---公司概况 start--->
        <div class="layui-form layuimini-form">
            <div id="Layer2" hidden>
                <div class="layui-form-item">
                    <label class="layui-form-label">1. 公司介绍<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入公司介绍" lay-verify="required" lay-reqtext="公司介绍不能为空"  class="layui-textarea" name="cominfo"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">2. 公司组织架构<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入组织架构" lay-verify="required" lay-reqtext="组织架构不能为空"  class="layui-textarea" name="zz"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">3. 公司吸引人才的优势<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入人才优势"   lay-verify="required" lay-reqtext="人才优势不能为空" class="layui-textarea" name="rc"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">4. 公司的发展战略<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入发展战略"  lay-verify="required"  lay-reqtext="发展战略不能为空" class="layui-textarea" name="fz"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">5. 公司高层背景介绍<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入背景介绍"   lay-verify="required" lay-reqtext="背景介绍不能为空"   class="layui-textarea" name="zj"></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">提醒对象</label>
                    <div class="layui-input-block">
                        <input  type="text" name="tx" class="layui-input" placeholder="请输入提醒对象">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <a class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn1">提交</a>
                    </div>
                </div>
            </div>
        </div>
            <!---公司概况 end--->
            <!---产品情况 start--->
        <div class="layui-form layuimini-form">
            <div id="Layer3" hidden>
                    <div class="layui-form-item">
                        <label class="layui-form-label">1. 主要的产品或服务<font color="red">*</font></label>
                        <div class="layui-input-block">
                            <textarea placeholder="请输入产品服务" lay-verify="required" lay-reqtext="产品服务不能为空" class="layui-textarea" name="pros"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">2. 主要的应用领域<font color="red">*</font></label>
                        <div class="layui-input-block">
                            <textarea placeholder="请输入应用领域" lay-verify="required" lay-reqtext="应用领域不能为空"  class="layui-textarea" name="ly"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">3. 主要的竞争对手<font color="red">*</font></label>
                        <div class="layui-input-block">
                            <textarea placeholder="请输入竞争对手" lay-verify="required" lay-reqtext="竞争对手不能为空" class="layui-textarea" name="jz"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">提醒对象</label>
                        <div class="layui-input-block">
                            <input  type="text" name="tx" class="layui-input" placeholder="请输入提醒对象">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn2">提交</button>
                        </div>
                    </div>
                </div>
                </div>
                <!---产品情况 end--->
                <!---薪资福利 start--->
        <div class="layui-form layuimini-form">
          <div id="Layer4" hidden>
                        <div class="layui-form-item">
                            <label class="layui-form-label">1. 每年固定多少个月的工资<font color="red">*</font></label>
                            <div class="layui-input-block">
                                <textarea placeholder="请输入工资" lay-verify="required" lay-reqtext="工资不能为空" class="layui-textarea" name="gz"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">2. 目标奖金的范围<font color="red">*</font></label>
                            <div class="layui-input-block">
                                <textarea placeholder="请输入奖金" lay-verify="required" lay-reqtext="奖金不能为空"  class="layui-textarea" name="jz"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">3. 每月的补贴（不包含在工资内的）<font color="red">*</font></label>
                            <div class="layui-input-block">
                                <textarea placeholder="请输入补贴" lay-verify="required" lay-reqtext="补贴不能为空" class="layui-textarea" name="bd"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">4. 额外的福利政策<font color="red">*</font></label>
                            <div class="layui-input-block">
                                <textarea placeholder="请输入福利政策" lay-verify="required" lay-reqtext="福利政策不能为空" class="layui-textarea" name="fl"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">提醒对象</label>
                            <div class="layui-input-block">
                                <input  type="text" name="tx" class="layui-input" placeholder="请输入提醒对象">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn3">提交</button>
                            </div>
                        </div>
                    </div>
                    </div>
                    <!---薪资福利 end--->
        <!---满意度调查 start--->
        <div class="layui-form layuimini-form">
            <div id="Layer5" hidden>
                <div class="layui-form-item">
                    <label class="layui-form-label">1.在整个猎头合作的进程中，您对于我们在猎头流程运作方面的评价？<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入评价" lay-verify="required" lay-reqtext="评价不能为空" class="layui-textarea" name="pj"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">2．在提供人选的速度方面，您有何评价？<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入评价" lay-verify="required" lay-reqtext="评价不能为空" class="layui-textarea" name="rx"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">3．在提供人选的匹配度方面，您有何评价？<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入评价" lay-verify="required" lay-reqtext="评价不能为空" class="layui-textarea" name="pp"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">4．您对于我们的顾问能力的评价？<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入评价" lay-verify="required" lay-reqtext="评价不能为空" class="layui-textarea" name="gw"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">5．在猎头服务的其他方面，您认为需要改进的方面是<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入评价" lay-verify="required" lay-reqtext="评价不能为空" class="layui-textarea" name="fw"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn4">提交</button>
                    </div>
                </div>
            </div>
            </div>
        <!---满意度调查 end--->
        <div class="layui-form layuimini-form">
            <div id="Layer6" hidden>
                <div class="layui-form-item">
                    <label class="layui-form-label">备注<font color="red">*</font></label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入备注" lay-verify="required" lay-reqtext="备注不能为空" class="layui-textarea" name="remark"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn4">提交</button>
                    </div>
                </div>
            </div>
            </div>
        </div>
    </div>


</div>
<script>
        layui.use(['layer','form', 'table','miniPage','element'], function () {
            var $ = layui.jquery,
                layer = layui.layer,
                form = layui.form,
                table = layui.table,
                miniPage = layui.miniPage,
                element = layui.element;
            /**
             * 初始化表单，要加上，不然刷新部分组件可能会不加载
             */
            form.render();

            // 当前弹出层，防止ID被覆盖
            var parentIndex = layer.index;

            //监听提交   公司概况
            form.on('submit(saveBtn)', function (data) {
                var index = layer.alert(JSON.stringify(data.field), {
                   title: '最终的提交信息'
                });
                _subUrl = '/api/customer/edit.json';
                $.post(_subUrl, data.field, function (res) {
                    if (res.status == 1) {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                    } else {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                        return false;
                    }
                }, "json")
            }, function () {
                // 关闭弹出层
                layer.close(index);
                layer.close(parentIndex);

            });


            //监听提交   公司概况
            form.on('submit(saveBtn1)', function (data) {
                var index = layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                });
                _subUrl = '/api/customer/edit.json';
                $.post(_subUrl, data.field, function (res) {
                    if (res.status == 1) {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                    } else {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                        return false;
                    }
                }, "json")
            }, function () {
                // 关闭弹出层
                layer.close(index);
                layer.close(parentIndex);

            });

            //监听提交   产品情况
            form.on('submit(saveBtn2)', function (data) {
                var index = layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                });
                _subUrl = '/api/customer/edit.json';
                $.post(_subUrl, data.field, function (res) {
                    if (res.status == 1) {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                    } else {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                        return false;
                    }
                }, "json")
            }, function () {
                // 关闭弹出层
                layer.close(index);
                layer.close(parentIndex);

            });


            //监听提交   薪资福利
            form.on('submit(saveBtn3)', function (data) {
                var index = layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                });
                _subUrl = '/api/customer/edit.json';
                $.post(_subUrl, data.field, function (res) {
                    if (res.status == 1) {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                    } else {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                        return false;
                    }
                }, "json")
            }, function () {
                // 关闭弹出层
                layer.close(index);
                layer.close(parentIndex);

            });

            //监听提交   满意度调查
            form.on('submit(saveBtn4)', function (data) {
                var index = layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                });
                _subUrl = '/api/customer/edit.json';
                $.post(_subUrl, data.field, function (res) {
                    if (res.status == 1) {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                    } else {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                        return false;
                    }
                }, "json")
            }, function () {
                // 关闭弹出层
                layer.close(index);
                layer.close(parentIndex);

            });


            //监听提交   备注
            form.on('submit(saveBtn5)', function (data) {
                var index = layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                });
                _subUrl = '/api/customer/edit.json';
                $.post(_subUrl, data.field, function (res) {
                    if (res.status == 1) {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                    } else {
                        parent.layer.msg(res.msg, {
                            time: 1000, //1s后自动关闭
                        });
                        return false;
                    }
                }, "json")
            }, function () {
                // 关闭弹出层
                layer.close(index);
                layer.close(parentIndex);

            });


            form.on('select(form1)', function(data){
                if (data.value==1)
                {
                    $("#Layer1").show();
                    $("#Layer2").hide();
                    $("#Layer3").hide();
                    $("#Layer4").hide();
                    $("#Layer5").hide();
                    $("#Layer6").hide();
                }
                if(data.value==2){
                    $("#Layer2").show();
                    $("#Layer1").hide();
                    $("#Layer3").hide();
                    $("#Layer4").hide();
                    $("#Layer5").hide();
                    $("#Layer6").hide();
                }

                if(data.value==3){
                    $("#Layer3").show();
                    $("#Layer1").hide();
                    $("#Layer2").hide();
                    $("#Layer4").hide();
                    $("#Layer5").hide();
                    $("#Layer6").hide();
                }

                if(data.value==4){
                    $("#Layer4").show();
                    $("#Layer1").hide();
                    $("#Layer2").hide();
                    $("#Layer3").hide();
                    $("#Layer5").hide();
                    $("#Layer6").hide();
                }

                if(data.value==5){
                    $("#Layer5").show();
                    $("#Layer1").hide();
                    $("#Layer2").hide();
                    $("#Layer3").hide();
                    $("#Layer4").hide();
                    $("#Layer6").hide();
                }


                if(data.value==6){
                    $("#Layer6").show();
                    $("#Layer1").hide();
                    $("#Layer2").hide();
                    $("#Layer3").hide();
                    $("#Layer5").hide();
                    $("#Layer4").hide();
                }
            });


        });

</script>